package com.feige.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.feige.pojo.User;
import com.feige.pojo.UserCourse;
import com.feige.pojo.vo.UserVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户课程表 Mapper 接口
 * </p>
 *
 * @author feige
 * @since 2020-11-20
 */

@Repository
public interface UserCourseMapper extends BaseMapper<UserCourse> {

    /**
     *  分页查询课程用户
     * @author: feige
     * @date: 2021/3/2 16:37
     * @param	map
     * @return: java.util.List<com.feige.pojo.User>
     */
    List<User> getCourseUser(Map<String, Object> map);

    /**
     *  查询课程用户数
     * @author: feige
     * @date: 2021/3/2 17:22
     * @param	courseId
     * @return: int
     */
    int getCourseUserCount(String courseId);


    /**
     * 查询课程的所有用户
     * @param courseId
     * @return
     */
    List<UserVo> getCourseUserVoByCourseId(@Param("courseId") String courseId);
}
